package com.beamfield.dao.process;

import com.beamfield.model.*;
import com.beamfield.modelVo.ProcNoticeVo;
import com.beamfield.modelVo.ProcNoticeWithDetailVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ProcNoticeMapper {
    int deleteByPrimaryKey(Long notice_id);

    int insert(ProcNotice record);

    int insertSelective(ProcNotice record);

    ProcNotice selectByPrimaryKey(Long notice_id);

    int updateByPrimaryKeySelective(ProcNotice record);

    int updateByPrimaryKey(ProcNotice record);

    List<ProcNoticeVo> select(@Param("offset") String offset,
                              @Param("limit") String limit,
                              @Param("beamId") Long beamId,
                              @Param("projectName") String projectName,
                              @Param("date") String date,
                              @Param("noticeId") String noticeId,
                              @Param("step") String step);

    long count(@Param("beamId") Long beamId,
               @Param("projectName") String projectName,
               @Param("date") String date,
               @Param("noticeId") String noticeId,
               @Param("step") String step);

    ProcNoticeWithDetailVo selectByPrimaryKey2(@Param("noticeId") String noticeId);

    TjzNotice selectTJZ(@Param("noticeId") String noticeId);
    CmNotice selectCm(@Param("noticeId") String noticeId);
    YzlNotice selectYzl(@Param("noticeId") String noticeId);
    CzlNotice selectCzl(@Param("noticeId") String noticeId);
    ZzlNotice selectZzl(@Param("noticeId") String noticeId);
    YclNotice selectYcl(@Param("noticeId") String noticeId);
    QszjNotice selectQszj(@Param("noticeId") String noticeId);
    FmNotice selectFm(@Param("noticeId") String noticeId);
    JlNotice selectJl(@Param("noticeId") String noticeId);
    DlNotice selectDl(@Param("noticeId") String noticeId);

    List<ProcNotice> selectByBeamId(@Param("beamId") Long beamId);

    ProcNoticeWithDetailVo selectByLastStep(@Param("step") int step,@Param("beamId")Long beamId);

    int countByStep(@Param("beamId") Long beamId,
                    @Param("symbol") String symbol,
                    @Param("step") int step,
                    @Param("span") String span);

    int countSaveBeam(@Param("beamId") Long beamId);

    List<ProcNotice> selectByStep(@Param("beamId") Long beamId,
                                  @Param("symbol") String symbol,
                                  @Param("symbol2") String symbol2,
                                  @Param("step") Integer step,
                                  @Param("step2") Integer step2);
    List<Long> getNoticeIdByBeam_NoAndProject_id(@Param("project_detail_id")String project_detail_id,@Param("project_id") String project_id,@Param("beamId") Long beamId);

    ProcNoticeWithDetailVo selectByStepAndNoticeId(@Param("step") Integer step,@Param("notice_id") Long notice_id);

    List<ProcNoticeWithDetailVo> selectByBeamIdWithDetail(Long beamId);

    List<ProcNotice> selectAllBeamNo(@Param("beamId") Long beamId);

    ProcNotice selectByProjectDetailId(@Param("projectDetailId") long projectDetailId);

    List<ProcNotice> selectByBeamNo(@Param("offset")Integer offset,@Param("limit")Integer limit,@Param("beamNo")String beamNo,@Param("beamId") Long beamId);

    int countByBeamNo(@Param("beamNo")String beamNo,@Param("beamId") Long beamId);
}